package com.ctgu.redislock02.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ctgu.redislock02.entity.ProductsEntity;
import com.ctgu.redislock02.utils.ApiResult;

/**
* @author Alex2
* @description 针对表【t_products】的数据库操作Service
* @createDate 2025-03-13 16:10:32
*/
public interface ProductsService extends IService<ProductsEntity> {

    ApiResult insertProduct(Integer id, String name, Integer stack);

    ApiResult getProductWithLock(Integer id, Integer userId);

    ApiResult getProductWithSetNxEX(Integer id, Integer userId);

    ApiResult purchaseWithLua(Integer id, Integer userId);

    ApiResult purchaseWithRedisson(Integer id, Integer userId);

    ApiResult purchaseWithRabbitMQ(Integer id, Integer userId);
}